import request from '@/utils/request'

export default {
  // 分析结果
  getAnalyzeResult (current, limit) {
    return request({
      url: `/analyze/result/${current}/${limit}`,
      method: 'get'
    })
  },
  getAnalyzeInfo (id) {
    return request({
      url: `/analyze/info/${id}`,
      method: 'get'
    })
  },
  // 上传文件列表
  getAnalyzeHistory (current, limit) {
    return request({
      url: `/file/list/${current}/${limit}`,
      method: 'get'
    })
  },
  // 上传文件
  uploadFile () {
    return request({
      url: `/file/upload`,
      method: 'post'
    })
  },
  // 删除文件
  delete (id) {
    return request({
      url: `/file/${id}`,
      method: 'delete'
    })
  },
  // 删除文件
  clean (id) {
    return request({
      url: `/analyze/clean/${id}`,
      method: 'post'
    })
  },

  analyze (id) {
    return request({
      url: `/analyze/exec/${id}`,
      method: 'post'
    })
  }
}
